/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jnlpc.utils;

import java.io.File;

/**
 *
 * @author Admin
 */
public class Filtro extends javax.swing.filechooser.FileFilter {

    private String desc;
    private String ext;

    public Filtro(String ex, String dec){
        desc = dec;
        ext = ex;
    }

    @Override
    public boolean accept(File f) {
        return f.getName().toLowerCase().endsWith(ext) || f.isDirectory();
    }

    @Override
    public String getDescription() {
        return desc;
    }


}
